<style>
    .plupload-preview li,
    .faupload-preview li {
        margin-top: 0px;
        margin-bottom: 15px;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_id" data-rule="required" data-source="myadmin/company/index/selectpage" placeholder="请选择企业"
                data-field="name" class="form-control selectpage" name="row[company_id]" type="text" value="{$company_id}">
        </div>
    </div>
    
    <div class="form-group" style="display: {$category_id>0?'none':'block'};">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" data-source="myadmin/web/product_category/selectpage" placeholder="请选择分类"
                data-field="name" class="form-control selectpage" name="row[category_id]" type="text" value="{$category_id>0?$category_id:''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" placeholder="请输入名称" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" placeholder="请输入标题" name="row[title]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" data-rule="required" placeholder="请输入描述" class="form-control" rows="4" name="row[description]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <div class="row">
                <div class="col-xs-6">
                    <div class='input-group date'>
                        <span class="input-group-addon">{:__('Price')}</span>
                        <input id="c-price" data-rule="required" class="form-control" placeholder="请输入价格"
                            name="row[price]" type="number" value="">
                        <span class="input-group-addon">元</span>
                    </div>
                </div>
                <div class="col-xs-6">
                    <div class='input-group date'>
                        <span class="input-group-addon">{:__('Labelname')}</span>
                        <input id="c-labelname" data-rule="required" class="form-control" placeholder="标签（如：购买）"
                            name="row[labelname]" type="text" value="">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <div class="row">
                <div class="col-xs-6">
                    <div class='input-group date'>
                        <span class="input-group-addon">{:__('Unitnum')}</span>
                        <input id="c-unitnum" data-rule="required" class="form-control" placeholder="输入数量"
                            name="row[unitnum]" type="number" value="">
                    </div>
                </div>
                <div class="col-xs-6">
                    <div class='input-group date'>
                        <span class="input-group-addon">{:__('Unitname')}</span>
                        <input id="c-unitname" data-rule="required" class="form-control" placeholder="单位（如：个/件/斤）"
                            name="row[unitname]" type="text" value="">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cover')}:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview" id="p-cover"></ul>
            <div class="input-group">
                <input id="c-cover" readonly data-rule="required" class="form-control" data-rule="" size="50" name="row[cover]" type="text"
                    value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-cover" class="btn btn-danger faupload"
                            data-input-id="c-cover" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                            data-multiple="false" data-preview-id="p-cover"><i class="fa fa-upload"></i>
                        </button></span>
                    <span><button type="button" id="fachoose-cover" class="btn btn-primary fachoose"
                            data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"> <i
                                class="fa fa-list"></i> </button></span>
                </div>
                <span class="msg-box n-right" for="c-cover"></span>
            </div>
        </div>
    </div>
    
    <div class="form-group box-image">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
            <div class="input-group">
                <input id="c-image" readonly class="form-control" data-rule="" size="50" name="row[images]" type="text"
                    value="" data-tip="请上传图片">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload"
                            data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                            data-multiple="true" data-preview-id="p-image"><i class="fa fa-upload"></i>
                        </button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose"
                            data-input-id="c-image" data-mimetype="image/*" data-multiple="true"> <i
                                class="fa fa-list"></i> </button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
        </div>
    </div>

    <div class="form-group box-video">
        <label class="control-label col-xs-12 col-sm-2">{:__('Video')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video" readonly class="form-control" name="row[video]" type="text" value=""
                    data-tip="请上传视频文件">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-video" class="btn btn-danger plupload"
                            data-input-id="c-video" data-mimetype="video/mp4" data-multiple="false"><i
                                class="fa fa-upload"></i> </button></span>
                    <span><button type="button" id="fachoose-video" class="btn btn-primary fachoose"
                            data-input-id="c-video" data-mimetype="video/mp4" data-multiple="false"> <i
                                class="fa fa-list"></i> </button></span>
                </div>
                <span class="msg-box n-right" for="c-video"></span>
            </div>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio"
                        value="{$key}" {in name="key" value="normal" }checked{/in} /> {$vo}</label> {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>